/* 使用系统强大的CSS变量 */
:root {
    --brand-color: #3f51b5;
    --brand-light: #e8eaf6;
    --brand-dark: #303f9f;
    --accent-color: #ff4081;

    --success: #4caf50;
    --warning: #ff9800;
    --error: #f44336;
    --info: #2196f3;

    --text-color: #212121;
    --text-secondary: #757575;
    --text-disabled: #9e9e9e;

    --bg-color: #f9f9f9;
    --surface: #ffffff;
    --shadow: rgba(0, 0, 0, 0.1);

    --border-radius: 12px;
    --transition: 0.3s ease;
}

/* 动画关键帧 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pulseEffect {
    0% { box-shadow: 0 0 0 0 rgba(244, 67, 54, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(244, 67, 54, 0); }
    100% { box-shadow: 0 0 0 0 rgba(244, 67, 54, 0); }
}

@keyframes blinkEffect {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* 音效播放按钮悬停效果 */
.audio-control:hover {
    transform: scale(1.1);
    background-color: var(--brand-dark);
}

/* 全局滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
}

/* 加载动画 */
.loader {
    border: 4px solid var(--brand-light);
    border-radius: 50%;
    border-top: 4px solid var(--brand-color);
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 工具提示 */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltip-text {
    visibility: hidden;
    width: 120px;
    background-color: rgba(0, 0, 0, 0.8);
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 5px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -60px;
    opacity: 0;
    transition: opacity 0.3s;
}

.tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* 响应式设计工具类 */
.hide-on-mobile {
    display: block;
}

@media (max-width: 768px) {
    .hide-on-mobile {
        display: none;
    }
}

/* 打字效果 */
.typing-effect::after {
    content: '|';
    animation: blink-caret 0.75s step-end infinite;
}

@keyframes blink-caret {
    from, to { opacity: 0; }
    50% { opacity: 1; }
} 